package cscie160.project;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * Simple account representation
 */
public interface Account extends Remote {

    /**
     * Deposit an amount of money into our account
     * @param amount  The amount to be deposited
     * @throws java.rmi.RemoteException Thrown if depositing a negative amount of money
     */
    public void deposit(float amount) throws RemoteException;

    /**
     * Withdraw an amount of money from our account
     * @param amount  The amount to be withdrawn
     * @throws RemoteException Thrown if withdrawing a negative amount of money or more money than is in the account
     */
    public void withdraw(float amount) throws RemoteException;

    /**
     * Returns balance of account
     * @return float The account balance
     */
    public float getBalance() throws RemoteException;
}
